home *** CD-ROM | disk | FTP | other *** search
-
- #import <objc/Object.h>
-
- @interface Simulator:Object
- {
- id costForm;
- id expProfitForm;
- id monthNrField;
- id evalForm;
- id inflationLossField;
- id succProbForm;
- id capitalField;
- id profitField;
- id inflationField;
- id meanProfitField;
- id meanPercentProfitField;
- id theRanGen; // random generator
- int monthNr, actionNumber;
- double inflation, percentProfitSum, meanPercentProfit; // in percent
- double capital, profit, profitSum, meanProfit; // in real value
- double inflationLoss; // in real value
- double cost[5]; // of action
- double probability[5]; // of action`s success in percent
- double expProfit[5]; // profit on success
- double eval[5]; // chance evaluation: probable profit
- // action characteristics:
- double chosenCost, chosenProbab, chosenProfit;
- }
-
- + new;
- - out:sender;
- - setRandomValues; // action values for cost, probability and profit
- - bPressed:sender;
- - cPressed:sender;
- - aPressed:sender;
- - dPressed:sender;
- - ePressed:sender;
- - month; // compute all necessary values and output them
- - output;
-
- @end
-